<template>
  <div class="app-container">
    <van-nav-bar title="集团信息" left-arrow @click-left="$router.push('/home')" />
    <div class="content-box">
      <div class="info-box" v-for="item in infoItemList" :key="item.label">
        <div class="time">{{ item.time }}</div>
        <div class="info-item" @click="toDetail(item)">
          <img class="cover" :src="require(`@/assets/images/laborNews/${item.cover}`)" alt="">
          <div class="text-box">
            <div class="title">{{ item.title }}</div>
            <div class="tip">{{ item.tip }}</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'GroupInfo',
  data() {
    return {
      form: { title: '' },
      infoItemList: [
        {
          time: '6月27日 10:47',
          title: '全国劳动模范风采（十三）丨大山通信“摆渡人”：一根扁担、17万公里、25年坚守',
          tip: '全国劳动模范风采（十三）丨大山通信“摆渡人”：一根扁担、17万公里、25年坚守',
          cover: '1.png',
          path: 'https://mp.weixin.qq.com/s/WlryMse1gqtT2wRJ0GfeiA?color_scheme=light',
        },
        {
          time: '6月26日 16:15',
          title: '终端翼家情——探索实打实、心贴心员工关爱方案',
          tip: '终端翼家情——探索实打实、心贴心员工关爱方案',
          cover: '2.png',
          path: 'https://mp.weixin.qq.com/s/I1b-sD7oGI2fRaAfoFbA-A?color_scheme=light',
        },
        {
          time: '6月25日 17:12',
          title: '全国劳动模范风采（十二）丨不停学、带头干！他为城市装上“智慧脑”',
          tip: '全国劳动模范风采（十二）丨不停学、带头干！他为城市装上“智慧脑”',
          cover: '3.png',
          path: 'https://mp.weixin.qq.com/s/VADedbgrX3_JP-q9E2sGoQ?color_scheme=light',
        },
      ],
    };
  },
  methods: {
    toDetail(item) {
      // if (item.status == 'primary') {
      //   // this.$router.push('/condolenceDistribution/detail');
      // }
      window.open(item.path, '_blank');
    },
  },
};
</script>

<style lang="scss" scoped>
@import '@/assets/styles/mixin.scss';

.content-box {
  width: calc(100% - 50px);
  height: calc(100% - 90px);
  padding: 20px 25px;
  display: flex;
  flex-direction: column;
  overflow: auto;
  & > div {
    margin-top: 30px;
    &:first-child {
      margin-top: 0px;
    }
  }
}

.info-box {
  width: 100%;
  .time {
    font-size: 14px;
    margin-bottom: 15px;
    text-align: center;
    color: #a8aaad;
  }
  .info-item {
    width: 100%;
    border-radius: 5px;
    border: 1px solid #eee;
    background-color: #fff;
    .cover {
      width: 100%;
    }
    .text-box {
      padding: 12px;
      .title {
        font-weight: bold;
        margin-bottom: 10px;
      }
      .tip {
        color: #6e7277;
        font-size: 14px;
      }
    }
  }
}
</style>